package com.loyal.loyalerp.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.loyal.loyalerp.model.GyPerson;

@Mapper
public interface GyPersonMapper {
	int deleteByPrimaryKey(Long id);

	int insert(GyPerson record);

	int insertSelective(GyPerson record);

	GyPerson selectByPrimaryKey(Long id);

	int updateByPrimaryKeySelective(GyPerson record);

	int updateByPrimaryKey(GyPerson record);

	@Delete("delete from gy_person where companyId=#{id}")
	int deleteByCompanyId(Integer id);

	@Delete("delete from gy_person where deptId=#{id}")
	void deleteByDepartmentId(Integer id);

	int selectPersonIdByUserId(int userId);

	@Select("select * from gy_person")
	List<GyPerson> selectAllPerson();
}